package com.woniu.apiimpl;


import com.woniu.api.HisUroscopyAPI;
import com.woniu.dto.QueryBloodDto;
import com.woniu.dto.QueryUroscopyDto;
import com.woniu.param.CreateUroscopyParam;
import com.woniu.param.QueryUroscopyParam;
import com.woniu.service.IHisUroscopyService;
import com.woniu.util.Result;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * <p>
 * 尿检表 前端控制器
 * </p>
 *
 * @author ${author}
 * @since 2021-11-11
 */
@RestController
@RequestMapping("/uroscopy")
public class HisUroscopyAPIImpl implements HisUroscopyAPI {

    @Resource
    private IHisUroscopyService uroscopyService;

    @Override
    public Result<QueryUroscopyDto> queryUroscopy(QueryUroscopyParam queryUroscopyParam) {
        QueryUroscopyDto queryUroscopyDto = uroscopyService.queryUroscopy(queryUroscopyParam);
        return Result.bulid(QueryUroscopyDto.class).setData(queryUroscopyDto);
    }

    @Override
    public Result<QueryUroscopyDto> createUroscopy(CreateUroscopyParam createUroscopyParam) {
        QueryUroscopyDto queryUroscopyDto = uroscopyService.createUroscopy(createUroscopyParam);
        return Result.bulid(QueryUroscopyDto.class).setData(queryUroscopyDto);
    }
}

